package xipujewel.xipujewel.entity.app;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import xipujewel.xipujewel.entity.IdEntity;

@Entity
@Table(name = "xipujewel_ring_type")
public class RingType extends IdEntity {

	private String name;
	private List<Ring> rings = new ArrayList<Ring>();

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@OneToMany(mappedBy = "ringType", fetch = FetchType.EAGER)
	public List<Ring> getRings() {
		return rings;
	}

	public void setRings(List<Ring> rings) {
		this.rings = rings;
	}

}
